package com.outdoor.server.mapper;

import com.outdoor.pojo.entity.EventRegistration;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EventRegistrationMapper {
    /**
     * 根据event id获取event registration列表
     * @param id
     * @return
     */
    @Select("SELECT * FROM event_registration WHERE eid = #{id}")
    List<EventRegistration> getByEventId(Long id);

    @Select("SELECT COUNT(*) FROM event_registration WHERE eid = #{id}")
    int getCountByEventId(Long id);


    List<EventRegistration> getByEventIdAndStatus(Long id, Integer status);
}
